import pygame

class Interface(object):

    def __init__(self):
        self.colors = [(100, 0 ,0), (150, 50, 50), (235, 155, 19)]
        
    def CorneredBox(self, surface, x, y, w, h):
        col = self.colors
        rect = pygame.Rect(x, y, w, h)
        pygame.draw.rect(surface, col[0], rect)
        pygame.draw.rect(surface, col[2], rect, 6)
        z = 30
        for i in range(2):
            for k in range(2):
                rect = pygame.Rect(i*(w-z), y+(k*(h-z)), z, z)
                pygame.draw.rect(surface, col[2], rect) 
        
        z = 22
        for i in range(2):
            for k in range(2):
                rect = pygame.Rect(i*(w-z-8)+4, y+4+(k*(h-z-8)), z, z)
                pygame.draw.rect(surface, col[1], rect) 
        z = 14
        rect = pygame.Rect(x, y, w, h)
        rect = rect.inflate(-10, -10)
        pygame.draw.rect(surface, col[1], rect, 4)
        for i in range(2):
            for k in range(2):
                rect = pygame.Rect(i*(w-z-16)+8, y+8+(k*(h-z-16)), z, z)
                pygame.draw.rect(surface, col[0], rect) 

        return surface
    
    def UncorneredBox(self, surface, x, y, w, h):
        col = self.colors
        rect = pygame.Rect(x, y, w, h)
        pygame.draw.rect(surface, col[0], rect)
        rect = rect.inflate(-8, -8)
        pygame.draw.rect(surface, col[1], rect, 8)
        rect = rect.inflate(3, 3)
        pygame.draw.rect(surface, col[2], rect, 3)
        
        return surface